#include <iostream>

class RentHouse
{
public:
    virtual void rentHouse() = 0;
};

// 房东
class Landlord :public RentHouse
{
public:
    void rentHouse()
    {
        std::cout << "将房子租出去" << std::endl;
    }
};

// 中介代理，加强租房子功能
class Intermediary :public RentHouse
{
public:
    void rentHouse()
    {
        std::cout << "发布招租启示\n";
        std::cout << "带人看房\n";
        _land.rentHouse();
        std::cout << "负责维修\n";
    }
private:
    Landlord _land;
};

int main()
{
    Intermediary inter;
    inter.rentHouse();
    return 0;
}